<style scoped>
.sitecode .tempalte-title {
  font-weight: bold;
  color: #353535;
  font-size: 15px;
}
.sitecode .active {
  color: #409eff;
}
.noticeShowM {
  border-left: 4px solid #409EFF;
  padding: 15px;
  font-size: 13px;
  line-height: 1.7;
  background: #F0F8FF;
  margin-bottom: 20px;
}
</style>
<!--  -->
<template>
  <div class="sitecode">
    <div class="noticeShowM">
      <p>
        整站代码是最先放在浏览器中的代码，其次是各个站点的代码（如果是单站点则没有），再次是页面代码，代码分别有如下几个位置插入！
      </p>
      <p>
        页面 &lt;meta /&gt; 标签之后
      </p>
      <p>
        页面 &lt;/head&gt; 标签之前
      </p>
      <p>
        页面 &lt;body&gt; 标签之后
      </p>
      <p>
        页面 &lt;/body&gt; 标签之前
      </p>
    </div>
    <el-collapse v-model="activeName">
      <el-collapse-item name="1">
        <template slot="title">
          <div :class="{'tempalte-title': true, 'active': activeName.indexOf('1') > -1}"><i
              class="header-icon el-icon-info"></i>&nbsp;&nbsp;整站设置</div>
        </template>
        <HostSCode />
      </el-collapse-item>
      <el-collapse-item v-if="currentSite && currentSite.list && currentSite.list.length > 1" name="2">
        <template slot="title">
          <div :class="{'tempalte-title': true, 'active': activeName.indexOf('2') > -1}"><i
              class="header-icon el-icon-info"></i>&nbsp;&nbsp;当前站点设置 - {{
          currentSite && currentSite.language && currentSite.language.name
        }}</div>
        </template>
        <SiteSCode />
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
import TipColla from '@/components/common/TipColla.vue'
import HostSCode from '@/components/main/user/codemanagement/HostSCode.vue'
import SiteSCode from '@/components/main/user/codemanagement/SiteSCode.vue'
import { mapGetters } from 'vuex'
export default {
  computed: {
    ...mapGetters(['currentSite'])
  },
  mounted () {
  },
  data () {
    return {
      activeName: ['1']
    }
  },
  methods: {
  },
  components: {
    TipColla,
    HostSCode,
    SiteSCode
  }
}

</script>
